package com.lawrence.controller;

import com.lawrence.common.result.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 测试 Swagger 的类
 * @author wanglanglang
 */

@RestController
@Api(tags = "Swagger练习")
public class SwaggerController {

    @PostMapping("/swagger")
    @ApiModelProperty("swagger练习")
    public String hello() {
        return "swagger";
    }

    @GetMapping("/r")
    @ApiModelProperty("返回 R")
    public R returnR() {
        return R.ok();
    }

}
